package com.topideal.supplychain.hades.dict;

import org.apache.commons.lang.StringUtils;

/**
 * jira任务类型枚举
 * @author xuxiaoyan
 * @date 2018-09-11 18:40
 */
public enum IssueTypeEnum {

    TROUBLE("1","故障"),
    EPIC("10000","Epic"),
    STORY("10001","故事"),
    CONFIGURATION("10002","配置"),
    DEFECT("10203","缺陷"),
    NEED("10206","需求"),
    ONLINE("10400","上线"),
    DAILY("10500","日常事务"),
    ONLINEGUANGZHOU("10501","上线（广州）"),
    DATABASEUPDATE("10600","数据库变更"),
    EMA("10607","EMA"),
    SHIRO("10608","单点登录"),
    SUBTASK("10609","子任务"),
    CONFIRM("10700","需求确认"),
    NEWFUNCTION("2","新功能"),
    TASK("3","任务"),
    IMPROVE("4","改进"),
    SUB("5","Sub-task")
    ;

    // 类型id
    private String value;

    // 类型名
    private String name;

    IssueTypeEnum(String value, String name) {
        this.value = value;
        this.name = name;
    }

    public String getValue() {
        return this.value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(String value) {
        for (IssueTypeEnum issueStatusEnum : values()) {
            if (issueStatusEnum.getValue().equals(value)) {
                return issueStatusEnum.getName();
            }
        }
        return StringUtils.EMPTY;
    }
}
